<?php

declare(strict_types=1);

namespace App\CustHub\Request;

use Mine\MineFormRequest;

class FrdCircTaskRequest extends MineFormRequest
{
    public function saveRules(): array
    {
        return [
            'name' => 'required',
            'corp_id' => 'required',
//            'group_id' => 'required',
            'robot_ids' => 'required',
            'contact_data' => 'required',
            'send_content' => 'required',
            'send_time_config' => 'required',
            'timing_delete_switch' => 'required|in:0,1',
            'timing_delete_hour' => 'required_if:timing_delete_switch,1',
        ];
    }

    public function updateTaskRules(): array
    {
        return array_merge([
            'id' => 'required'
        ], $this->saveRules());
    }

    public function robotListRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function cancelTaskRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function deleteFriendCircleRules(): array
    {
        return [
            'id' => 'required'
        ];
    }

    public function addCommentsRules(): array
    {
        return [
            'id' => 'required',
            'comments' => 'required'
        ];
    }

    public function deleteTaskRules(): array
    {
        return [
            'id' => 'required'
        ];
    }
}